fix: is_temporal should be overridden by is_dttm value#11429
Merged
villebro merged 1 commit intoapache:masterfrom Oct 27, 2020
Merged
fix: is_temporal should be overridden by is_dttm value#11429villebro merged 1 commit intoapache:masterfrom
villebro merged 1 commit intoapache:masterfrom
Conversation
bff1a24 to
578f9a6
Compare
Codecov Report
@@ Coverage Diff @@
## master #11429 +/- ##
==========================================
- Coverage 66.55% 61.90% -4.65%
==========================================
Files 860 861 +1
Lines 40866 40920 +54
Branches 3694 3694
==========================================
- Hits 27198 25332 -1866
- Misses 13570 15408 +1838
- Partials 98 180 +82
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
bkyryliuk
approved these changes
Oct 27, 2020
ktmud
approved these changes
Oct 27, 2020
auxten
pushed a commit
to auxten/incubator-superset
that referenced
this pull request
Nov 20, 2020
This was referenced Nov 26, 2023
This was referenced Dec 14, 2023
This was referenced Dec 20, 2023
This was referenced May 14, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
TableColumnhas three properties to check the datatype of a column:is_numeric,is_stringandis_temporal.is_temporalis usually referenced when a new dataset is added to populate default values foris_dttm, which indicates whether or not a column is to added to the time column dropdown. While we should usually directly referenceis_dttm, the other slightly ambiguously named property can sometimes be used, causing incorrect behaviour.This PR changes the behaviour of
is_temporalto first check the value ofis_dttm, and if thatis not None(=after initial metadata extraction), return that value, otherwise check the datatype based on the column type. The placeholder text is also fixed, as it featured non-compliant syntax (Year is%Y, not%y).BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TEST PLAN
Added test.
ADDITIONAL INFORMATION